package com.benew.ntt.ydeval.utils;


import com.benew.ntt.evaluate.constant.EvalConst;
import com.blankj.utilcode.util.FileUtils;

public class EvalFileUtils {

    private final static String PCM_PATH = "%s/%s.pcm";
    private final static String WAV_PATH = "%s/%s.wav";

    public static String getPcmFileAbsolutePath(String fileName) {
        return getPath(PCM_PATH, fileName);
    }

    public static String getWavFileAbsolutePath(String fileName) {
        return getPath(WAV_PATH, fileName);
    }

    public static String getPath(String filepath, String fileName) {
        String path = String.format(filepath, EvalConst.INSTANCE.getRecordFilePath(), fileName);
        FileUtils.createOrExistsDir(path);
        return path;
    }
}
